'''多重方式读取文件'''
text = 'learning_python.txt'  
with open(text,'r',encoding = 'UTF-8') as file_object:
	temp_01 = file_object.read()       #读取全部文件
	# ~ temp_02 = file_object.readlines()  #读取文件到列表
	# ~ for line in file_object:           #读取单行文件（逐行读取）
		# ~ print(line)

print('-'*100)
print(temp_01)
print('-'*100)
# ~ for temp_02_line in temp_02:
	# ~ print(temp_02_line)
	
print('-'*100)
'''通过replace()方法替换字符串'''
massage = 'I like you!'
massage_01 = massage.replace('you','Mygirl Friend')
print(massage_01)

